package com.lwq.model;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.Expose;

public class NewMemberModel {
	@Expose
	private List<NewMemberItemModel> Content = null;

	public NewMemberModel() {
		Content = new ArrayList<NewMemberItemModel>();
	}

	public List<NewMemberItemModel> getContent() {
		return Content;
	}

	public NewMemberItemModel getItem(int index) {
		if (Content != null) {
			return Content.get(index);
		}
		return null;
	}

	public void addItem(NewMemberItemModel item) {
		if (Content != null) {
			Content.add(item);
		}
	}
	
	public boolean contains(NewMemberItemModel target) {
		boolean method = false;
		if(target != null && Content != null){
			method = target.getIsMethod();
			for(NewMemberItemModel item:Content){
				if(item.getIsMethod() == method){
					if(item.getItemContent().length() == target.getItemContent().length()){
						if(item.getItemContent().equalsIgnoreCase(target.getItemContent())){
							return true;
						}
					}
				}
			}
			
		}
		return false;
		
	}
}
